home *** CD-ROM | disk | FTP | other *** search
/ Champak 123 / (Vol 123) Jan 13 2011.iso / Games / mofro.swf / scripts / DefineSprite_111_phatman / frame_1 / PlaceObject2_7_14 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Text File  |  2011-01-13  |  400b  |  22 lines

  1. onClipEvent(enterFrame){
  2.    if(Math.abs(_root.hero._x - _parent._x) < 200 && Math.abs(_root.hero._y - _parent._y) < 150)
  3.    {
  4.       if(_parent.back)
  5.       {
  6.          _parent.prevFrame();
  7.       }
  8.       else
  9.       {
  10.          _parent.nextFrame();
  11.       }
  12.    }
  13.    else if(_parent._currentframe > 9)
  14.    {
  15.       _parent.nextFrame();
  16.    }
  17.    else
  18.    {
  19.       _parent.prevFrame();
  20.    }
  21. }
  22.